#include "at32f435_437_board.h"
#include "at32f435_437_clock.h"

#include "lcd_init.h"
#include "lcd.h"

#include <string.h>

int main(void)
{
  system_clock_config();
  nvic_priority_group_config(NVIC_PRIORITY_GROUP_4);

  delay_init();
  uart_print_init(921600);

  lcd_gpio_init();
  lcd_spi_config();
  LCD_Init();
  LCD_BLK_Set();

  LCD_Fill(0, 0, 240, 240, WHITE);
//  LCD_ShowString(0, 0, (uint8_t*)"Hello", GREEN, WHITE, 32, 1);
//  LCD_ShowFloatNum(0, 32, 4122.31, 6, GREEN, WHITE, 32, 1);

  LCD_ShowPicture(120, 120, 41, 56, gImage_1);
//  LCD_ShowChinese12x12(0, 0, (uint8_t *)"国", GREEN, WHITE, 12, 0);
  LCD_ShowChinese(10, 10, (uint8_t*)"繁花", RED, WHITE, 24, 1);
  LCD_ShowString(10, 34, (uint8_t*)"UTF-8 TEST", RED, WHITE, 24, 1);

  while(1)
  {
  }
}
